/*
 * Copyright (c) 2021. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package cn.edu.ntu.yyl.service;

import cn.edu.ntu.yyl.pojo.article.Article;
import cn.edu.ntu.yyl.pojo.article.ArticleComment;
import cn.edu.ntu.yyl.pojo.user.UserInfo;

import java.util.List;

public interface CommentService {
    // 增
    Integer InsertNewComment(ArticleComment articleComment);
    // 删
    Integer DeleteComment(ArticleComment articleComment);
    // 改
    Integer UpdateComment(ArticleComment articleComment);
    // 查
    List<ArticleComment> SelectAllComment();
    //按ID查询
    ArticleComment SelectCommentById(Integer Id);
    //审核评论
    Integer CheckComment(ArticleComment articleComment);
    //赞赏评论
    Integer GivelikeComment(ArticleComment articleComment);

    //按照状态查询
    List<ArticleComment> SelectCommentByStatus(String status);

    //置顶评论
    Integer RecommendComment(ArticleComment articleComment);
    //查看文章的评论
    List<ArticleComment> SelectCommentByArticle(Article article);
    //查看该评论的父评论
    ArticleComment SelectFatherCommentByComment(ArticleComment articleComment);
    //查看该评论的子评论
    List<ArticleComment> SelectChildrenCommentByComment(ArticleComment articleComment);
    //查看某用户的评论
    List<ArticleComment> SelectCommentByUser(UserInfo userInfo);
    //更新评论回复数量
    Integer UpdateCommentReplyCount(ArticleComment articleComment);
    //按照ip获取评论
    List<ArticleComment> SelectCommentByIP(String ip);

    //时间线查询
    List<ArticleComment> SelectTodayComment();
    List<ArticleComment> SelectYesterdayComment();
    List<ArticleComment> SelectSevenDayComment();
    List<ArticleComment> SelectFourteenDayComment();
    List<ArticleComment> SelectMonthComment();
}
